package com.example.crawler.exception;

import org.springframework.http.HttpStatus;

/**
 * @author pq
 * @date 2022/10/28 11:53
 * @description
 * @modified
 **/
public class CrawlerException extends RuntimeException{
    private String code;
    private Integer statusCode;
    private String message;

    public CrawlerException(Integer statusCode,String code,String message){
        super(message);
        this.code=code;
        this.message=message;
        this.statusCode=statusCode;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }

    public CrawlerException(String code, String message) {
        this(HttpStatus.OK.value(), code, message);
    }
}
